const obj={
    name:'唐扬',
    age:18,
    like:['篮球','足球'],
    a:undefined,
    b:null,

}

function deepClone(obj){
    return new Promise((resolve)=>{
    port1.postMessage(obj)
    port2.onmessage=(msg)=>{
        resolve(msg.data)
    }
    })
}
deepClone(obj).then(msg=>{
    console.log(msg);
    
})

